<%@ taglib prefix="c" uri="/WEB-INF/tlds/hdiv-c.tld"%>
<%@ taglib prefix="form" uri="/WEB-INF/tlds/hdiv-spring-form-3_0_4.tld"%>
<%@ taglib uri="/WEB-INF/tlds/hdiv-spring.tld" prefix="spring"%>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
  <tr>
    <td>
      <%--<img height="57" width="200" src="images/header_logo_ch.gif"/>--%>
    </td>
  </tr>
  <tr align="center">
    <td>
      <c:out value="Billetaje Recontado Por Denominacion"/>
    </td>
  </tr>
  <tr>
    <td>
      <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr>
          <td colspan="3">
            Cliente:
            <c:out value="${sessionScope.nombreCliente}"/>
          </td>
          <td colspan="1">&nbsp;</td>
          <td colspan="3">
            Billetaje:
            <c:if test="${hmf4001form.billetaje eq 1}">
              <c:out value="Ingresos"/>
            </c:if>
            <c:if test="${hmf4001form.billetaje eq 2}">
              <c:out value="Salidas"/>
            </c:if>
          </td>
        </tr>
        <tr>
          <td colspan="3">
            Cuenta:
            <c:forEach items="${sessionScope.listadoCuentas}" var="listCuen">
              <c:if test="${listCuen.numero eq hmf4001form.cuenta}">
                <c:out value="${listCuen.descripcion}"/>
              </c:if>
            </c:forEach>
          </td>
          <td>&nbsp;</td>
          <td colspan="3">
            Tipo Remitente:
            <c:if test="${hmf4001form.remitente eq 1}">
              <c:out value="Agencias"/>
            </c:if>
            <c:if test="${hmf4001form.remitente eq 2}">
              <c:out value="Clientes"/>
            </c:if>
            <c:if test="${hmf4001form.remitente eq 3}">
              <c:out value="Todos"/>
            </c:if>
          </td>
        </tr>
        <tr>
          <td colspan="3">
            Boveda:
            <c:forEach items="${listaModulos}" var="listaModulos">
              <c:if test="${listaModulos.codBoveda eq hmf4001form.cuenta}">
                <c:out value="${listaModulos.descripcion}"/>
              </c:if>
            </c:forEach>
          </td>
          <td>&nbsp;</td>
          <td colspan="3">
            Tipo Ingreso:
            <c:if test="${hmf4001form.ingreso eq 1}">
              <c:out value="Normal"/>
            </c:if>
            <c:if test="${hmf4001form.ingreso eq 2}">
              <c:out value="Interno"/>
            </c:if>
          </td>
        </tr>
        <tr>
          <td colspan="7">
            Fecha:
            <c:out value="${hmf4001form.fechadesde}"/>
            al
            <c:out value="${hmf4001form.fechahasta}"/>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr>
          <td width="100">&nbsp;</td>
          <td width="100">&nbsp;</td>
          <td width="100">&nbsp;</td>
          <td>Denominaci&oacute;n</td>
          <td>Monto Recontado</td>
          <td>Piezas</td>
          <td>Pacas</td>
        </tr>
        <c:set var="listSize" value="0"/>
        <c:forEach items="${listConsoBillRec}" varStatus="status">
          <c:set var="listSize" value="${status.count}"/>
        </c:forEach>
        <c:set var="codPuntJsp" value="0"/>
        <c:set var="numCmpbJsp" value="0"/>
        <c:set var="canNumCmpb" value="0"/>
        <c:forEach items="${listBillRec}" var="listBillRec">
          <c:if test="${listBillRec.codPuntGeneral != codPuntJsp}">
            <tr>
              <td colspan="7">
                Punto&nbsp;
                <c:out value="${listBillRec.codPuntGeneral}"/>
                &nbsp;&nbsp;
                <c:out value="${listBillRec.desPuntGeneral}"/>
              </td>
            </tr>
            <c:forEach items="${listBillRecDeta}" var="listDetalle">
            <c:if test="${listDetalle.codPuntGeneral == listBillRec.codPuntGeneral}" >
              <tr>
                <td width="100">&nbsp;</td>
                <td width="100">&nbsp;</td>
                <td>
                  <c:out value="${listDetalle.desTipMone}"/>
                </td>
                <td>
                  <c:out value="${listDetalle.canValoNomi}"/>
                </td>
                <td>
                  <c:out value="${listDetalle.monDeno}"/>
                </td>
                <td>
                  <c:out value="${listDetalle.piezas}"/>
                </td>
                <td>
                  <c:out value="${listDetalle.ladrillos}"/>
                </td>
              </tr>
            </c:if>
            </c:forEach>
          </c:if>
          <c:if test="${listBillRec.numCmpb != numCmpbJsp}">
            <c:set var="canNumCmpb" value="${canNumCmpb +1}"/>
          </c:if>
          <!--acaba bucle iterate principal -->
          <c:set var="codPuntJsp" value="${listBillRec.codPuntGeneral}"/>
          <c:set var="numCmpbJsp" value="${listBillRec.numCmpb}"/>
        </c:forEach>
        <tr>
          <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="7">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="6" align="right">
            Numero de Servicios:
            <c:out value="${canNumCmpb}"/>
          </td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="7">Total General:</td>
        </tr>
        <c:forEach items="${listConsoBillRec}" var="listConsoBillRec">
          <tr>
            <td width="100">&nbsp;</td>
            <td width="100">&nbsp;</td>
            <td>
              <c:out value="${listConsoBillRec.desTipMone}"/>
            </td>
            <td>
              <c:out value="${listConsoBillRec.canValoNomi}"/>
            </td>
            <td>
              <c:out value="${listConsoBillRec.monDeno}"/>
            </td>
            <td>
              <c:out value="${listConsoBillRec.piezas}"/>
            </td>
            <td>
              <c:out value="${listConsoBillRec.ladrillos}"/>
            </td>
          </tr>
        </c:forEach>
      </table>
    </td>
  </tr>
</table>